﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using System.Text.Json.Serialization;

namespace HZYProject.Domain
{
    /// <summary>
    /// 章节
    /// </summary>
    public class Chapter
    {
        /// <summary>
        /// 章节编号
        /// </summary>
        [Key]
        public Guid ChapterID { get; set; }

        /// <summary>
        /// 章节名称
        /// </summary>
        [StringLength(50)]
        public string Title { get; set; }

        /// <summary>
        /// 所属课程编号
        /// </summary>
        public Guid CourseID { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [DataType(DataType.DateTime)]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 导航属性-所属课程
        /// </summary>
        
        public virtual Course Course {get;set;}
    }
}
